<header>
    <label for="title">ToDoList</label>
    <input id="title" type="text" name="title" placeholder="添加ToDo" [(ngModel)]="keywords" (keyup)="doAdd($event)" />
</header>

<h2>正在进行</h2>
<ul>
    <li *ngFor="let item of todoList;let key=index" [hidden]="item.status==1">
        <input type="checkbox" [(ngModel)]="item.status" />{{item.title}}
        <button (click)="deleteData(key)">删除</button>
    </li>
</ul>

<h2>已完成事项</h2>
<ul class="shadow">
    <li *ngFor="let item of todoList;let key=index" [hidden]="item.status==0">
        <input type="checkbox" [(ngModel)]="item.status" />{{item.title}}
        <button (click)="deleteData(key)">删除</button>
    </li>
</ul>